<template>
  <div class="ele-body ele-body-card">
    <index-data></index-data>
    <el-card shadow="never">
     
      <ele-pro-table
          ref="table"
          :request="request"
          :columns="columns"
          :datasource="datasource"
          :selection.sync="selection"
          :toolbar="false"
        >
        <account-search @search="reload" />

      </ele-pro-table>
    </el-card>
  </div>
</template>

<script>
  import indexData from './components/index-data';
  import AccountSearch from './components/account-search';
  import { getIndexTableData } from '@/api/statis';
  export default {
    name: 'StatisticsIndex',
    components: { indexData,AccountSearch },
    
    data() {
      return {
        request: {
          sortName: 'sort',  // 排序字段参数名称
          orderName: 'order'  // 排序方式的参数名称
        },
        // 表格列配置
        columns: [
          {
            columnKey: 'index',
            type: 'index',
            width: 45,
            align: 'center',
            showOverflowTooltip: true,
            fixed: 'left'
          },
          {
            prop: 'telphone',
            label: '开发者',
            align: 'center',
            showOverflowTooltip: true,
            minWidth: 120
          },
          {
            prop: 'soundCount',
            label: '声音合成次数（次）',
            align: 'center',
            sortable: 'custom',
            showOverflowTooltip: true,
            minWidth: 80
          },
          {
            prop: 'soundSecond',
            label: '声音合成时长（分）',
            sortable: 'custom',
            align: 'center',
            showOverflowTooltip: true,
            minWidth: 80
          },
          {
            prop: 'voiceCount',
            label: '声音克隆次数（次）',
            align: 'center',
            showOverflowTooltip: true,
            minWidth: 80
          },
          {
            prop: 'videoCount',
            label: '视频合成次数（次）',
            sortable: 'custom',
            align: 'center',
            showOverflowTooltip: true,
            minWidth: 80
          },
          {
            prop: 'videoSecond',
            label: '视频合成时长（分）',
            align: 'center',
            sortable: 'custom',
            showOverflowTooltip: true,
            minWidth: 80
          },
          {
            prop: 'avatarCount',
            label: '视频克隆次数（次）',
            align: 'center',
            showOverflowTooltip: true,
            minWidth: 80
          }
        ],
        // 表格选中数据
        selection: [],
        // 当前编辑数据
        current: null,
      };
    },
    methods: {
      /* 表格数据源 */
      datasource({ page, limit, where, order }) {
        return getIndexTableData({ ...where, ...order, page, limit });
      },
      /* 刷新表格 */
      reload(where) {
        this.$refs.table.reload({ page: 1, where: where });
      },
    
    }
  };
</script>

<style scoped>
.title {
    padding-left: 10px;
    border-left: 3px solid #0256ff;
    font-size: 15px;
    color: #303133;
  }
  .card_box_cir1 .iconfont {
      font-size: 26px;
      color: #fff;
  }
  .card_icon{
    width: 52px;
    height: 52px;
  }

  .card_box {
      width: 100%;
      height: 100%;
      display: flex;
      -webkit-box-align: center;
      align-items: center;
      box-sizing: border-box;
      border-radius: 4px;
  }
  .card_box .card_box_cir {
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
  }



   .card_box .card_box_cir {
    
    border-radius: 50%;
    display: flex;
    -webkit-box-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    align-items: center;
  }

  
  .card_box .card_box_cir {
    width: 45px;
    height: 45px;
    overflow: hidden;
    margin-right: 20px;
  }

  .card_box .card_box_txt .sp1 {
    display: block;
    color: #252631;
    font-size: 14px;
    margin-bottom: 5px;
  }

  .card_box .card_box_txt .sp2 {
    display: block;
    color: #98a9bc;
    font-size: 16px;
  }

  .card_box .card_box_txt .sp3 {
    color:#1890FF;
    font-size: 20px;
  }
  .monitor-count-card ::v-deep .el-card__body {
    padding-top: 18px;
    text-align: center;
    position: relative;
  }

  .monitor-count-card ::v-deep .el-tag {
    border-color: transparent;
    font-size: 15px;
  }

  .monitor-count-card .monitor-count-card-num {
    font-weight: 500;
    font-size: 32px;
    margin-top: 12px;
  }

  .monitor-count-card .monitor-count-card-text {
    font-size: 12px;
    margin: 10px 0;
  }

  .monitor-count-card .monitor-count-card-trend {
    font-weight: 600;
    padding: 6px 0;
  }

  .monitor-count-card .monitor-count-card-trend > i {
    font-size: 12px;
    font-weight: 600;
    margin-right: 5px;
  }

  .monitor-count-card .monitor-count-card-tips {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
  }
</style>
